Socket
Socket
Sign inDemoInstall

@tiptap/extension-strike

Package Overview
Dependencies
Maintainers
5
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-strike

strike extension for tiptap


Version published
Weekly downloads
992K
increased by6.1%
Maintainers
5
Weekly downloads
 
Created

What is @tiptap/extension-strike?

@tiptap/extension-strike is an extension for the Tiptap editor that provides functionality for strikethrough text formatting. It allows users to apply and remove strikethrough styling to selected text within the editor.

What are @tiptap/extension-strike's main functionalities?

Add Strikethrough Formatting

This code demonstrates how to add the strikethrough extension to a Tiptap editor instance. The content includes an example of text with strikethrough formatting.

import { Strike } from '@tiptap/extension-strike';
import { Editor } from '@tiptap/core';

const editor = new Editor({
  extensions: [
    Strike,
  ],
  content: '<p>This is a <s>strikethrough</s> example.</p>',
});

Toggle Strikethrough Formatting

This code shows how to toggle strikethrough formatting on the selected text in the editor. If the selected text already has strikethrough, it will be removed; otherwise, it will be applied.

editor.chain().focus().toggleStrike().run();

Other packages similar to @tiptap/extension-strike

Keywords

FAQs

Package last updated on 23 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc